home *** CD-ROM | disk | FTP | other *** search
- Path: skivs.ski.org!usenet
- From: gt@ns.oon.or.jp (Gemini Thunder)
- Newsgroups: comp.lang.c
- Subject: Re: fflush and Visual C++
- Date: Sun, 17 Mar 1996 03:18:49 GMT
- Organization: Smith-Kettlewell Eye Research Institute
- Message-ID: <4ig0cq$gkg@skivs.ski.org>
- References: <4idhv5$dnv@news.mhv.net> <314b173b.71056173@nntp.ix.netcom.com>
- NNTP-Posting-Host: oonserv.oon.or.jp
- X-Newsreader: Forte Free Agent 1.0.82
-
- miker3@ix.netcom.com (Mike Rubenstein) wrote:
-
- >Vinny.Bedus@bbs.mhv.net (Vinny Bedus) wrote:
-
- >> Can someone please tell me why when fflush function is used in Visual C
- >> under a dos box it doesn't work? I have no problems with turbo c for win
- >> but anything else and it doesn't flush the stdin buffer.
- >> any ans??????????????
-
- >Perhaps because Visual C implements fflush() correctly. fflush() does
- >not flush input buffers. fflush() with stdin as an argument results
- >in undefined behavior.
-
- >Michael M Rubenstein
-
- Could you explain why fflush(stdin) results in undefined behavior?
- I have been using this construct, (apparently) unaware of this.
-
-